import request from "@/utils/request";  

////查询员工数据
export const queryPageApi=(name,gender,begin,end,page,pageSize)=>
  request.get(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`);

//新增部门
export const addEmpApi=(employee) =>request.post("/emps",employee);

//根据id查询数据
export const queryByIdApi=(id) =>request.get(`/emps/${id}`);

//修改
export const updateEmpApi=(employee) =>request.put("/emps",employee);


//删除
export const deleteByIdApi=(ids) =>request.delete(`/emps?ids=${ids}`);

//查询全部员工
export const listApi=()=>request.get("/emps/list");